/*************************************************************************
	> File Name: Example5_2.java
	> Author: Potter
	> Mail: tobewhatwewant@gmail.com 
	> Created Time: 2014年07月07日 星期一 21时07分42秒
 ************************************************************************/
class People {
    private int averHeight = 166;
    public int getAverHeight() {
        return averHeight;
    }
}

class ChinaPeople extends People {
    int height;
    public void setHeight(int h) {
        // height = h + averHeight; // 非法，子类没有继承averHeight
        height = h;
    }

    public int getHeight () {
        return height;
    }
}

public class Example5_2 {
    public static void main(String args[]) {
        ChinaPeople zhangSan = new ChinaPeople();
        System.out.println("子类对象未继承的averageHeight的值是"+zhangSan.getAverHeight());
        zhangSan.setHeight(175);
        System.out.println("子类对象的实例变量height的值是:"+zhangSan.getHeight());
    }
}
